package com.spring.security.core.properties;

/**
 * @author seabed_moon
 */
public interface SecurityConstants {

    /**
     * 默认的处理验证码的url前缀
     */
    String DEFAULT_VALIDATE_CODE_URL_PREFIX = "/code";
    /**
     * 当请求需要身份认证时，默认跳转的url
     */
    String DEFAULT_UNAUTHENTICATION_URL = "/authentication/require";
    /**
     * 默认的用户名密码登录请求处理url
     */
    String DEFAULT_SIGN_IN_PROCESSING_URL_FORM = "/authentication/form";
    /**
     * 默认的手机验证码登录请求处理url
     */
    String DEFAULT_SIGN_IN_PROCESSING_URL_MOBILE = "/authentication/mobile";
    /**
     * 默认的OPENID登录请求处理url
     */
    String DEFAULT_SIGN_IN_PROCESSING_URL_OPENID = "/authentication/openid";

    /**
     * 默认的用户名密码登出请求处理url
     */
    String DEFAULT_SIGN_OUT_PROCESSING_URL_FORM = "/signOut";

    /**
     * 默认的oauth登出请求处理url
     */
    String DEFAULT_SIGN_OUT_OAUTH_URL_FORM = "/logout";
    /**
     * 默认登录页面
     */
    String DEFAULT_SIGN_IN_PAGE_URL = "/signIn.html";
    /**
     * 验证图片验证码时，http请求中默认的携带图片验证码信息的参数的名称
     */
    String DEFAULT_PARAMETER_NAME_CODE_IMAGE = "imageCode";
    /**
     * 验证短信验证码时，http请求中默认的携带短信验证码信息的参数的名称
     */
    String DEFAULT_PARAMETER_NAME_CODE_SMS = "smsCode";
    /**
     * 发送短信验证码 或 验证短信验证码时，传递手机号的参数的名称
     */
    String DEFAULT_PARAMETER_NAME_MOBILE = "mobile";

    String USER_NAME_KEY = "username";


    /**
     * deviceId参数名
     */
    String DEFAULT_PARAMETER_NAME_DEVICEID = "deviceId";
    /**
     * openid参数名
     */
    String DEFAULT_PARAMETER_NAME_OPENID = "openId";

    String DEFAULT_PARAMETER_NAME_ACCESS_TOKEN = "access_token";

    /**
     * SSIONID参数名
     */
    String[] DEFAULT_PARAMETER_NAME_SESSIONS = {"JSESSIONID","SESSION"};

    /**
     * Authorization参数名
     */
    String DEFAULT_PARAMETER_NAME_AUTHORIZATION = "Authorization";

    /**
     * bearer参数名
     */
    String DEFAULT_PARAMETER_NAME_BEARER = "bearer ";
    /**
     * providerId参数名
     */
    String DEFAULT_PARAMETER_NAME_PROVIDERID = "providerId";
    /**
     * session失效默认的跳转地址
     */
    String DEFAULT_SESSION_INVALID_URL = "/session-invalid.html";
    /**
     * 获取第三方用户信息的url
     */
    String DEFAULT_SOCIAL_USER_INFO_URL = "/social/user";

    /**
     * html 后缀
     */
    String DEFAULT_SUFFIX = ".html";

    /**
     * token 刷新url
     */
    String REFRESH_TOKEN_URL = "/token/refresh";

    /**
     * 默认的refresh_token参数名
     */
    String DEFAULT_PARAMETER_NAME_REFRESH_TOKEN = "refresh_token";

    /**
     * 单设备登录key
     */
    String SINGLE_DEVICE_LOGIN = "single_device_login:";

    /**
     * 用户信息key
     */
    String TOKEN_USER_INFO = "token_user_info:";

    /**
     * client_id
     */
    String CLIENT_ID = "client_id:";

    /**
     * 默认的basic
     */
    String DEFAULT_BASIC = "Basic ";

    /**
     * 默认的app basic
     */
    String DEFAULT_BASIC_APP = "Basic App";

    /**
     * 默认的pc basic
     */
    String DEFAULT_Basic_PC = "Basic PC";

    /**
     * 默认的三方 basic
     */
    String DEFAULT_BASIC_THREE_PARTY = "Basic ThreeParty";


    /**
     * 默认的headers
     */
    String DEFAULT_ACCESS_CONTROL_ALLOW_HEADERS = "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With";

    /**
     * 默认的credentials
     */
    String DEFAULT_ACCESS_CONTROL_ALLOW_CREDENTIALS = "true";

    /**
     * 默认的methods
     */
    String DEFAULT_ACCESS_CONTROL_ALLOW_METHODS = "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH";

    /**
     * 短信发送校验key
     */
    String SMS_CODE_SEND_CHECK_KEY = "sms_code_send_check:";

    String CLIENT_AUTHENTICATION_EXCEPTION_MSG = "请求头中无client信息";

    String CLIENT_SECRET_NOT_FOUND = "clientSecret不匹配:";

    String ERROR_CLIENT_ID_OR_CONFIG_INFO_NOT_FOUND = "错误的clientId或对应的配置信息不存在:";

    String LOGIN_SUCCESS_MSG  = "LOGIN SUCCESS";

    String LOGOUT_SUCCESS_MSG  = "LOGOUT SUCCESS";

    String MISMATCHED_LOGIN_TYPE  = "不匹配的登录类型";

}
